package com.brtbeacon.demo.lot.adapter;

import android.view.View;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.brtbeacon.demo.lot.R;
import com.brtbeacon.demo.lot.entity.FloorInfo;

public class FloorViewHolder extends RecyclerView.ViewHolder {

    private FloorInfo info;
    private TextView tvName;

    public FloorViewHolder(@NonNull View itemView) {
        super(itemView);
        tvName = itemView.findViewById(R.id.tv_name);
    }

    public void bind(FloorInfo info) {
        this.info = info;
        tvName.setText(info.getName());
        itemView.setSelected(info.isSelected());
    }

    public FloorInfo getInfo() {
        return info;
    }
}
